package com.ssy.lingxi.search.service;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.model.vo.PageVO;
import com.ssy.lingxi.search.api.model.request.CommodityCollectBatchRequest;
import com.ssy.lingxi.search.api.model.request.CommodityCollectRequest;
import com.ssy.lingxi.search.api.model.response.CollectResponse;
import com.ssy.lingxi.search.entity.CommodityCollect;
import org.springframework.data.domain.Page;

/**
 * 商品收藏管理类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/9/2
 */
public interface ICommodityCollectService {
    /**
     * 查询商品收藏--商品能力
     * @param pageVO
     * @return Wrapper<Page<CommodityCollect>>
     */
    Page<CommodityCollect> getCommodityCollectList(UserLoginCacheDTO sysUser, Long shopId, PageVO pageVO);

    /**
     * 查询商品收藏--商品能力
     * @param pageVO
     * @return Wrapper<Page<CommodityCollect>>
     */
    Page<CommodityCollect> getCommodityCollectList(UserLoginCacheDTO sysUser, PageVO pageVO);

    /**
     * 查询该商品是否已经收藏
     * @param commodityId 商品id
     */
    CollectResponse getCommodityCollectByCommodityId(Long commodityId, UserLoginCacheDTO sysUser, Long shopId);

    /**
     * 添加商品收藏
     * @param commodityCollectRequest
     * @return
     */
    Long saveCommodityCollect(UserLoginCacheDTO sysUser, Long shopId, CommodityCollectRequest commodityCollectRequest);

    /**
     * 批量添加商品收藏
     * @param simpleCommodityIdListRequest
     * @return
     */
    Boolean saveBatchCommodityCollect(UserLoginCacheDTO sysUser, Long shopId, CommodityCollectBatchRequest simpleCommodityIdListRequest);

    /**
     * 删除商品收藏
     * @param commodityCollectRequest
     * @return
     */
    String deleteCommodityCollect(UserLoginCacheDTO sysUser, Long shopId, CommodityCollectRequest commodityCollectRequest);

    /**
     * 删除商品收藏通过id
     * @param id
     * @return
     */
    String deleteCommodityCollectById(UserLoginCacheDTO sysUser, Long id);

}
